<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<div id="content" class="col-lg-10 col-sm-10">
    <!-- content starts -->
    <div>
        <ul class="breadcrumb">
            <li>
                <a href="#">Home</a>
            </li>
            <li>
                <a href="#">Add Division</a>
            </li>
        </ul>
    </div>
    <div class="row">
        <div class="box col-md-12">
            <div class="box-inner">
                <div class="box-header well" data-original-title="">
                    <h2><i class="glyphicon glyphicon-edit"></i> Add division </h2>

<!--                    <div class="box-icon">
                        <a href="#" class="btn btn-setting btn-round btn-default"><i
                                class="glyphicon glyphicon-cog"></i></a>
                        <a href="#" class="btn btn-minimize btn-round btn-default"><i
                                class="glyphicon glyphicon-chevron-up"></i></a>
                        <a href="#" class="btn btn-close btn-round btn-default"><i
                                class="glyphicon glyphicon-remove"></i></a>
                    </div>-->
                </div>
                <div class="box-content">
                    <form role="form" action="UpdateDivisionAction.do" method="post" onsubmit="return validate()">

                        <div class="form-group">
                            <label for="exampleInputEmail1">Enter Division Name</label>
                            <input type="text" name="name" class="form-control" value="${sessionScope.detail.name}" id="exampleInputEmail1" placeholder="Enter Division Name">
                            <span style="color: red" id="branch_error_txt"><html:errors property="name" ></html:errors></span>
                        </div>
                        <div class="box-content">
                            
                             <div class="controls">
                                 <select id="selectError" data-rel="chosen"value="${sessionScope.detail.bid}" name="bid">
                                    <c:forEach var="branch" items="${applicationScope.allbranches}">
                                        <option value="${branch.id}">${branch.name}</option>                                                
                                    </c:forEach>
                                </select>
                            </div>
                            <br>
                             <div  class="controls">
                                Semester
                                <select name="semester" value="${sessionScope.detail.semester}">
                                    <c:forEach var="i" begin="1" end="8">
                                        <option>      <c:out value="${i}"/></option>
                                    </c:forEach>

                                </select>
                                </div>
                                <input type="hidden" name="id" value="${applicationScope.detail.id}">
                
                        <div class="form-group">
                            <button type="submit" class="btn btn-default">Add</button>
                    </form>
                </div>
            </div>
            <!--/span-->

        </div><!--/row-->

        <!-- content ends -->
    </div><!--/#content.col-md-0-->
</div>
</div>